package cn.com.greatwall.user.service.impl;

import java.util.List;
import java.util.Set;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.com.greatwall.common.model.SysMenu;
import cn.com.greatwall.common.service.impl.SuperServiceImpl;
import cn.com.greatwall.user.mapper.SysRoleMenuMapper;
import cn.com.greatwall.user.model.SysRoleMenu;
import cn.com.greatwall.user.service.ISysRoleMenuService;

/**
 * @Author herw
 * @Time 2022-02-19 15:21:45
 * @Version 1.0
 * @Description: TODO(用一句话描述该文件做什么)
 */
@Service
public class SysRoleMenuServiceImpl extends SuperServiceImpl<SysRoleMenuMapper, SysRoleMenu> implements ISysRoleMenuService {
    @Resource
    private SysRoleMenuMapper sysRoleMenuMapper;
    
    @Override
    public int delete(Long roleId, Long menuId) {
        return sysRoleMenuMapper.delete(roleId, menuId);
    }
    
    @Override
    public List<SysMenu> findMenusByRoleIds(Set<Long> roleIds, Integer type) {
        return sysRoleMenuMapper.findMenusByRoleIds(roleIds, type);
    }
    
    @Override
    public List<SysMenu> findMenusByRoleCodes(Set<String> roleCodes, Integer type) {
        return sysRoleMenuMapper.findMenusByRoleCodes(roleCodes, type);
    }
}
